/**
 * 
 */
package com.nars.exceptions.excersices.starter;

import java.util.Scanner;

import com.nars.exceptions.excersices.MyCustomException;

/**
 * @author Student
 *
 */
public class ExceptionStarter {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		final int min_year = 1900;
		
		Scanner input = new Scanner(System.in);
		System.out.println("Enter a year: "); 
		int year = input.nextInt();
		
		if (year > min_year) {
			try {
				throw new MyCustomException("Entered year is " + year);
			} catch (MyCustomException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		
		}
		
	}
}
